Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ALTCHA, an alternative to current Google Recaptcha #10456

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Godoy0722
Copy link

No description provided.

Copy link
Member

@asmecher asmecher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the extreme delay in reviewing this, @Godoy0722!

}

if (!PKP_STRICT_MODE) {
class_alias('\PKP\form\validation\FormValidatorAltcha', '\FormValidatorAltcha');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless it's required for some other reason, the class_aliases should only be provided for backwards compatibility; new code shouldn't require it except in a few exceptional cases.

@@ -0,0 +1,8 @@
/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than committing 3rd-party code directly to our repository, is it possible to install this via an NPM dependency or, failing that, possibly even with Composer?

* @param string $altchaConfigKey the key to search on config.inc.php
* @param TemplateManager $templateMgr
*/
private function generateAltchaComponent($altchaConfigKey, &$templateMgr): void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wherever possible, add typehints in new code; also remove redundant code self-documentation while you're at it. The @param string $altchaConfigKey adds a description, so it's valuable, but once it has a typehint, @param TemplateManager $templateMgr adds nothing and should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants